<#macro resolveDefaults entityName>
  <#list entities.entity as entity>
     <#if entity.@name=entityName>
    	<#list entity.column as column>
    		<#if column.@default[0]??>
    		    <#if column.@type="String">
    	this.${column.@name} =  "${column.@default}";
    		    <#else>
    	this.${column.@name} = ${column.@default};
    		    </#if>
    		<#elseif embeddables.embeddable.@name?seq_contains(column.@type)>
    	this.${column.@name} = new ${column.@type}();
        	<#elseif column.@type?cap_first="Double" || column.@type?cap_first="Float">
    	this.${column.@name} = 0.0;
    		<#elseif column.@type?cap_first="Integer">
    	this.${column.@name} = 0;
    		<#elseif column.@type?cap_first="Date">
    	this.${column.@name} = new Date();
    	<#elseif column.@type?cap_first="Boolean">
    	this.${column.@name} = false;
        	</#if>
    	</#list>
    </#if>
  </#list>
</#macro>

